package com.data.mv.sql;

import java.util.List;

public class SqlSelectTable {
    public static String select(String tableName, List<String> cols) {
        StringBuilder sql = new StringBuilder("select").append(" ");
        cols.stream().forEach(e -> {
            sql.append("\"").append(e).append("\"").append(",");
        });
        sql.deleteCharAt(sql.length()-1);
        sql.append(" ").append("from").append(" ");
        sql.append(tableName);
        return sql.toString();
    }
}
